//初始化vue 搜索框
new Vue({
    el: ".container",
    data() {
        return {
            //异步数据请求
            arrayList: null,
            keyword: null,
            option: {
                type: 'GET',
                url: '/getSearchData',
                data: {
                    word: '',
                    page: 0
                }
            }
        }
    },
    watch: {
        keyword() {
            this.option.data.word = this.keyword;
        }
    },
    mounted() {
        new lazy({
            attr: "data",
            th: 20,
            prop: "delay"
        });
    },
    methods: {
        search() {
            let req = request(this.option)
            req.then(e => {
                this.arrayList = e.data;
                new lazy({
                    attr: "data",
                    th: 20,
                    prop: "delay"
                });
            })
        }
    }
})



